package entity;

import net.chopinlite.*;
import net.chopinlite.mapping.*;

import java.util.Set;

@Table
public class Order extends Entity {
    @Column(name = "order_time")
    private SimpleDate orderTime; //下单时间
    @ManyToOne
    private User customer; //下单顾客
    @OneToMany
    private Set<OrderItem> items; //订单项目集合（一对多）

    public SimpleDate getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(SimpleDate orderTime) {
        this.orderTime = orderTime;
    }

    public User getCustomer() {
        return customer;
    }

    public void setCustomer(User customer) {
        this.customer = customer;
    }

    public Set<OrderItem> getItems() {
        return items;
    }

    public void setItems(Set<OrderItem> items) {
        this.items = items;
    }
}
